const {CleanWebpackPlugin} = require("clean-webpack-plugin")
const CmpressionWebpackPlugin = require("compression-webpack-plugin")
module.exports = {
    mode:"production",
    optimization:{
      splitChunks:{
          chunks: "all"
      }  
    },
    plugins:[
        new CleanWebpackPlugin(),
        new CmpressionWebpackPlugin({
            filename:"[file].gzip",
            // test:/main\.js/ // 针对那些js进行压缩
            minRatio: 1, // 压缩之后体积要小于0.8才处理
        })
    ]
}